package ro.prjmanager.core.list;

/**
 * AnalyzeErrorsBase.java
 * <p/>
 * Copyright (c) 2009 Teamnet. All Rights Reserved.
 * <p/>
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of Teamnet.
 */
public class RowJson {
            String id;
            String[] cell;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getCell() {
                StringBuilder ret=new StringBuilder();
                if(cell!=null&&cell.length>0){
                    int p=0;
                    for(String str:cell){
                        if(p>0){
                            ret=ret.append(",");
                        }
                        ret=ret.append("'").append(str).append("'");
                        p++;
                    }
                }
                return ret.toString();
            }

            public void setCell(String[] cell) {
                this.cell = cell;
            }

            public RowJson(int cellNo){
                cell=new String[cellNo];
            }

            public void setCellByNo(int no,String value){
                cell[no]=value;
            }

}
